<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="base/base::head('用户管理',~{::link},~{::script},~{::style})">

    <link rel="stylesheet" th:href="${session.basePath}+'/resource/imp/system/css/userMgr.css'" />
    <script type="text/javascript" th:src="${session.basePath}+'/resource/plugins/wdfjslib/page.js'"></script>
    <script type="text/javascript" th:src="${session.basePath}+'/resource/imp/system/js/userMgr.js'" charset="utf-8"></script>
    <script type="text/javascript" th:src="${session.basePath}+'/resource/imp/system/js/userOrgRoleEdit.js'" charset="utf-8"></script>

</head>
<body class="page">

<!-- 查询面板 -->
<form id='searchForm'>
    <div class="searchBar">
        <div class='searchInput' id='searchUserPanel'>

            <div class='block'>
                <div class='label'>
                    姓名：
                </div>
                <div class='input1 input'>
                    <input type='text' name='name' placeholder="用户姓名" maxlength="30"/>
                </div>
            </div>

            <div class='block'>
                <div class='label'>
                    帐号：
                </div>
                <div class='input1 input'>
                    <input type='text' name='userName' placeholder="帐号" maxlength="30"/>
                </div>
            </div>

            <div class='block'>
                <div class='label'>
                    所属机构：
                </div>
                <div class='input1 input'>
                    <input id="department_User_SearchPanel" placeholder="全部" readonly="readonly"/>
                </div>
            </div>

            <div class='block'>
                <div class='label'>
                    所属角色：
                </div>
                <div class='input1 input'>
                    <input id="role_User_SearchPanel" placeholder="全部" readonly="readonly"/>

                </div>
            </div>

            <div class="optBtnsBar">
                <input type='button' class="optBtn searchBtn" onclick='search();' value='查询' />
                <input type='button' class="optBtn restBtn" onclick="resetSearch();" value="重置"/>

                <input type='button' class="optBtn searchBtn" onclick='addUser();' value='新增用户' />
            </div>
            <div style="clear:both"></div>

        </div>
    </div>
</form>

<div class="split"></div>

<div class="content">

    <div id="userGrid"></div>

</div>

<!-- 新建用户面板 -->
<div class="pannel_bg">
    <div class='panel' id="addUserPanel">
        <form id='addUserForm'>
            <input type='hidden' name='cType' value='PCWEB' placeholder="客户端类型"/>
            <div class='titleBar'>
                <div class="title"></div>
                <div class="closeBtn">返回</div>
            </div>
            <div class='split'></div>
            <div class='content'>
                <table class='panelForm'>
                    <tr>
                        <td class='label'>用户名：</td>
                        <td class='input'><input type='text' id='userName_User_AddPanel' name="userName" maxlength="30"/></td>
                        <td class='info'><span style='color:red;'>*</span></td>
                    </tr>
                    <tr>
                        <td class='label'>密码：</td>
                        <td class='input'><input type="password" id="password_User_AddPanel" name="password" maxlength="30"/></td>
                        <td class='info'><span style='color:red;'>*</span></td>
                    </tr>
                    <tr>
                        <td class='label'>用户姓名：</td>
                        <td class='input'><input type='text' id='name_User_AddPanel' name="name" maxlength="30"/></td>
                        <td class='info'><span style='color:red;'>*</span></td>
                    </tr>
                    <tr>
                        <td class='label'>所属机构：</td>
                        <td class='input'><input type='text' id='department_User_AddPanel' readonly="readonly"/></td>
                        <td class='info'><span style='color:red;'>*</span></td>
                    </tr>
                    <tr>
                        <td class='label'>性别：</td>
                        <td class='input'>
                            <select id='sex_User_AddPanel' name='sex'>
                                <option value="1">男</option>
                                <option value="0">女</option>
                            </select>
                        </td>
                        <td class='info'><span style='color:red;'>*</span></td>
                    </tr>
                    <tr>
                        <td class='label'>邮箱：</td>
                        <td class='input'><input type='text' id='email_User_AddPanel' name="email" maxlength="30"/></td>
                        <td class='info'><span style='color:red;'></span></td>
                    </tr>
                    <tr>
                        <td class='label'>手机号：</td>
                        <td class='input'><input type='text' id='phone_User_AddPanel' name="phone" maxlength="11"/></td>
                        <td class='info'><span style='color:red;'></span></td>
                    </tr>
                    <tr>
                        <td class='label lbTextarea'>备注：</td>
                        <td class='input'><textarea id="description_User_AddPanel" rows="" cols="" name="description"
                                                    maxlength="200" placeholder="最大输入200个汉字..."></textarea></td>
                        <td class='info'><span style='color:red;'></span></td>
                    </tr>
                </table>
            </div>
            <div class='split'></div>
            <div class="btnContent">
                <div class='btnBar'><input value="保存" class='okBtn zhuanjiao_btn' type="button"/><input value="取消" class='quxiao_btn' type="button"/></div>
            </div>

        </form>
    </div>
</div>

<!-- 编辑用户面板 -->
<div class="pannel_bg">
    <div class='panel' id="editUserPanel">
        <form id='editUserForm'>
            <input type='hidden' name='cType' value='PCWEB' placeholder="客户端类型"/>
            <input type="hidden" id="id_User_EditPanel" name="id" value=""/>
            <div class='titleBar'>
                <div class="closeBtn">返回</div>
                <div class="title"></div>
            </div>
            <div class='split'></div>
            <div class='content'>
                <table class='panelForm'>
                    <tr>
                        <td class='label'>用户名：</td>
                        <td class='input'><input type='text' id='userName_User_EditPanel' readonly="readonly"
                                                 name="userName" maxlength="30"/></td>
                        <td class='info'><span style='color:red;'>*</span></td>
                    </tr>
                    <tr>
                        <td class='label'>密码：</td>
                        <td class='input'><input type="password" id="password_User_EditPanel" name="password"
                                                 onchange="changePassword(this);" maxlength="30"/></td>
                        <td class='info'><span style='color:red;'>*</span></td>
                    </tr>
                    <tr>
                        <td class='label'>用户姓名：</td>
                        <td class='input'><input type='text' id='name_User_EditPanel' name="name" maxlength="30"/></td>
                        <td class='info'><span style='color:red;'>*</span></td>
                    </tr>
                    <tr>
                        <td class='label'>所属机构：</td>
                        <td class='input'><input type='text' id='department_User_EditPanel' readonly="readonly"/></td>
                        <td class='info'><span style='color:red;'>*</span></td>
                    </tr>
                    <tr>
                        <td class='label'>性别：</td>
                        <td class='input'>
                            <select id='sex_User_EditPanel' name='sex'>
                                <option value="1">男</option>
                                <option value="0">女</option>
                            </select>
                        </td>
                        <td class='info'><span style='color:red;'>*</span></td>
                    </tr>
                    <tr>
                        <td class='label'>邮箱：</td>
                        <td class='input'><input type='text' id='email_User_EditPanel' name="email" maxlength="30"/></td>
                        <td class='info'><span style='color:red;'></span></td>
                    </tr>
                    <tr>
                        <td class='label'>电话：</td>
                        <td class='input'><input type='text' id='phone_User_EditPanel' name="phone" maxlength="11"/></td>
                        <td class='info'><span style='color:red;'></span></td>
                    </tr>
                    <tr>
                        <td class='label lbTextarea'>描述：</td>
                        <td class='input'><textarea id="description_User_EditPanel" rows="" cols="" name="description"
                                                    maxlength="200" placeholder="最大输入200个汉字..."></textarea></td>
                        <td class='info'><span style='color:red;'></span></td>
                    </tr>
                </table>

            </div>
            <div class='split'></div>
            <div class='btnBar'><input value="保存" class='okBtn zhuanjiao_btn' type="button"/><input value="取消" class='quxiao_btn' type="button"/></div>

        </form>
    </div>
</div>

<!--用户机构、角色权限管理面板-->
<div class="pannel_bg">
    <div class='panel' id="userAuthorityMgrPanel">
        <div class='titleBar' style="height: 73px;">
            <div class="closeBtn"></div>

        </div>
        <div class='split'></div>
        <div class='content' style="height: 100%;">
            <input type="hidden" name="userId" id="userAuthorityMgr_userIId"/>

            <div class="userAuthorityMgr_content">
                <div class="user_systemAuthority_box" id="user_systemAuthority_box">

                    <div class="selAuthorityBox selUser_box indexAuth_box">
                        <div class="selAuthority_tit">用户信息</div>
                        <div class="selAuthority_content">
                            <div class="formContent">
                                <form  id="addFormPannel" autocomplete="off">
                                    <input type='hidden' name="id" id="userId_addform" placeholder=""/>
                                    <div class='block verificationInput'>
                                        <div class='label_detail'>
                                            用户名：
                                        </div>
                                        <div class='input1_detail input_detail'>
                                            <input type='text' name="userName" id="userName_addform" style="background: none;" readonly="readonly"/>
                                        </div>
                                    </div>

                                    <div class='block verificationInput'>
                                        <div class='label_detail'>
                                            密码：
                                        </div>
                                        <div class='input1_detail input_detail'>
                                            <input type='text' name='password' id="password_addform" style="background: none;" placeholder=""/>
                                        </div>
                                    </div>

                                    <div class='block verificationInput'>
                                        <div class='label_detail'>
                                            用户姓名：
                                        </div>
                                        <div class='input1_detail input_detail'>
                                            <input type='text' name='name' id="name_addform" style="background: none;" readonly="readonly"/>
                                        </div>
                                    </div>
                                    <div class='block verificationInput'>
                                        <div class='label_detail'>
                                            所属机构：
                                        </div>
                                        <div class='input1_detail input_detail'>
                                            <input type='text' id='department_addform' name="departmentId" style="background: none;" readonly="readonly"/>
                                        </div>
                                    </div>
                                    <div class='block verificationInput'>
                                        <div class='label_detail'>
                                            性别：
                                        </div>
                                        <div class='input1_detail input_detail'>
                                            <input type='text' name="sex" id="sex_addform" style="background: none;" readonly="readonly"/>
                                        </div>
                                    </div>

                                    <div class='block verificationInput'>
                                        <div class='label_detail'>
                                            邮箱：
                                        </div>
                                        <div class='input1_detail input_detail'>
                                            <input type='text' name="email" id="email_addform" style="background: none;" readonly="readonly"/>
                                        </div>
                                    </div>
                                    <div class='block verificationInput'>
                                        <div class='label_detail'>
                                            手机号：
                                        </div>
                                        <div class='input1_detail input_detail'>
                                            <input type='text' name="phone" id="phone_addform" style="background: none;" readonly="readonly"/>
                                        </div>
                                    </div>

                                    <div class='block verificationInput'>
                                        <div class='label_detail'>
                                            备&nbsp;&nbsp;注：
                                        </div>
                                        <div class='input1_detail input_detail'>
                                            <textarea name='description' id="description_addform" readonly="readonly" style="width: 294px; height: 102px; background: none;" maxlength="100" placeholder="最大输入100个汉字"></textarea>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>

                    <div class="selAuthorityBox selOrg_box">
                        <div class="selAuthority_tit">机构权限
                            <input type="checkbox" class="authorityAllCheck" id="orgAllCheck"/>
                            <a id="checkAuthorityAllOrgBtn" class="checkAllBtn uncheckBtn" onclick="checkAuthorityAllOrg(this)" href="javascript:void(0)">全选</a></div>
                        <div class="selAuthority_content">
                            <ul class="ztree" id="orgSel_tree"></ul>
                        </div>
                    </div>

                    <div class="selAuthorityBox selRole_box">
                        <div class="selAuthority_tit">角色权限
                            <input class="authorityAllCheck" type="checkbox" id="roleAllCheck"/>
                            <a id="checkAuthorityAllRoleBtn" class="checkAllBtn uncheckBtn" onclick="checkAuthorityAllRole(this)" href="javascript:void(0)">全选</a>
                        </div>
                        <div class="selAuthority_content" id="selAuthority_content">
                            <ul class="ztree" id="roleSel_tree"></ul>
                        </div>

                    </div>

                    <!--<div class='split'></div>
                    <div class='btnBar'>
                        <input value="保存" class='okBtn zhuanjiao_btn' onclick="toSubUserOrgRole()" type="button"/>
                        <input value="取消" class='quxiao_btn' type="button"/>
                    </div>-->

                </div>
            </div>
        </div>

        <div class='split'></div>
        <div class="btnBar">
            <input value="保存" class='okBtn zhuanjiao_btn' onclick="toSubUserOrgRole()" type="button"/>
            <input value="取消" class='quxiao_btn' type="button"/>
        </div>

    </div>

</div>

<!-- 绑定Mac地址面板 -->
<div class="pannel_bg">
    <div class='panel' id="macListPanel">
        <div class='titleBar' >
            <div class="title"></div>
            <div class="closeBtn">返回</div>
        </div>

        <div class='split'></div>
        <div class="btnsBar">
            <input type='button' class="panalGridAdd_btn" onclick='addUserMac();' value='新增Mac地址' />
        </div>

        <div class='split'></div>
        <div class='content'>
            <div id="macGrid"></div>
        </div>

    </div>
</div>

</body>
</html>